package utils;

import java.util.List;

public class PageUtils {
    //1.页码值
    private Integer pageIndex;
    //2.显示条数
    private Integer pageSize=5;
    //3.查询结果
    private List dataList;
    //4.总条数
    private Integer total;
    //5.总页数
    private Integer totalPage;

    public Integer getPageIndex() {
        return pageIndex;
    }

    public void setPageIndex(Integer pageIndex) {
        this.pageIndex = pageIndex;
    }

    public Integer getPageSize() {
        return pageSize;
    }

    public void setPageSize(Integer pageSize) {
        this.pageSize = pageSize;
    }

    public List getDataList() {
        return dataList;
    }

    public void setDataList(List dataList) {
        this.dataList = dataList;
    }

    public Integer getTotal() {
        return total;
    }

    public void setTotal(Integer total) {
        this.total = total;
    }

    public Integer getTotalPage() {
        return  this.total%this.pageSize>0?
                this.total/this.pageSize+1:
                this.total/this.pageSize;
    }

    public void setTotalPage(Integer totalPage) {
        this.totalPage = totalPage;
    }
}
